<?php

use common\helpers\Html;
use common\widgets\ActiveForm;

$validationUrl = ['update', 'id' => $model->id];
?>
<div class="modal-dialog" role="document">
    <?php
    $form = ActiveForm::begin([
        'options' => [
            'class' => 'form-horizontal', //设置class属性  
        ],
        'enableAjaxValidation' => true,
        'enableClientAjaxSubmit' => true,
        'validationUrl' => $validationUrl,
    ]);
    ?>
    <div class="modal-content">
        <div class="modal-header">
            <h5 id="jstree-modal-label" class="modal-title"></h5>
            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
        </div>
        <div class="modal-body">
            <?= $form->field($model, 'text')->textInput() ?>
            <?= $form->field($model, 'icon')->fontIconPicker() ?>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <?= Html::submitButton('保存', ['class' => 'btn btn-primary']); ?> 
        </div>
    </div>
    <?php ActiveForm::end(); ?>
</div>